home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / Think-Pascal-7.0.cpt / THINK Pascal Interfaces / Script.p < prev    next >
Encoding:
Text File  |  1991-04-03  |  41.1 KB  |  1,059 lines  |  [TEXT/PJMM]

  1. {    This file has been processed by The THINK Pascal Source Converter, v1.1.    }
  2.  
  3. {}
  4. {Created: Tuesday, January 15, 1991 at 8:56 AM}
  5. {    Script.p}
  6. {    Pascal Interface to the Macintosh Libraries}
  7. {}
  8. {        Copyright Apple Computer, Inc.    1986-1990}
  9. {        All rights reserved}
  10. {}
  11.  
  12.  
  13.  
  14. {    RMS    4/3/91        Modified to exclude declarations already in the THINK Pascal built-in interfaces    }
  15.  
  16.  
  17.  
  18. unit Script;
  19. interface
  20.  
  21.     const
  22.  
  23. { Script System constants }
  24.         smSystemScript = -1;                                {designates system script.}
  25.         smCurrentScript = -2;                               {designates current font script.}
  26.  
  27.         smRoman = 0;                                        {Roman}
  28.         smJapanese = 1;                                     {Japanese}
  29.         smTradChinese = 2;                                  {Traditional Chinese}
  30.         smKorean = 3;                                       {Korean}
  31.         smArabic = 4;                                       {Arabic}
  32.         smHebrew = 5;                                       {Hebrew}
  33.         smGreek = 6;                                        {Greek}
  34.         smCyrillic = 7;                                     {Cyrillic}
  35.         smRSymbol = 8;                                      {Right-left symbol}
  36.         smDevanagari = 9;                                   {Devanagari}
  37.         smGurmukhi = 10;                                    {Gurmukhi}
  38.         smGujarati = 11;                                    {Gujarati}
  39.         smOriya = 12;                                       {Oriya}
  40.         smBengali = 13;                                     {Bengali}
  41.         smTamil = 14;                                       {Tamil}
  42.         smTelugu = 15;                                      {Telugu}
  43.         smKannada = 16;                                     {Kannada/Kanarese}
  44.         smMalayalam = 17;                                   {Malayalam}
  45.         smSinhalese = 18;                                   {Sinhalese}
  46.         smBurmese = 19;                                     {Burmese}
  47.         smKhmer = 20;                                       {Khmer/Cambodian}
  48.         smThai = 21;                                        {Thai}
  49.         smLaotian = 22;                                     {Laotian}
  50.         smGeorgian = 23;                                    {Georgian}
  51.         smArmenian = 24;                                    {Armenian}
  52.         smSimpChinese = 25;                                 {Simplified Chinese}
  53.         smTibetan = 26;                                     {Tibetan}
  54.         smMongolian = 27;                                   {Mongolian}
  55.         smGeez = 28;                                        {Geez/Ethiopic}
  56.         smEthiopic = 28;                                    {Synonym for smGeez}
  57.         smEastEurRoman = 29;                                {Synonym for smSlavic}
  58.         smVietnamese = 30;                                  {Vietnamese}
  59.         smExtArabic = 31;                                   {extended Arabic}
  60.         smUninterp = 32;                                    {uninterpreted symbols, e.g. palette symbols}
  61.  
  62. {Obsolete names for script systems (kept for backward compatibility)}
  63.         smChinese = 2;                                      {(use smTradChinese or smSimpChinese)}
  64.         smRussian = 7;                                      {(old name for smCyrillic)}
  65.  
  66. { smMaldivian = 25;                                 (no more smMaldivian!)}
  67.         smAmharic = 28;                                     {(old name for smGeez)}
  68.         smSlavic = 29;                                      {(old name for smEastEurRoman)}
  69.         smSindhi = 31;                                      {(old name for smExtArabic)}
  70.  
  71. { Calendar Codes }
  72.         calGregorian = 0;
  73.         calArabicCivil = 1;
  74.         calArabicLunar = 2;
  75.         calJapanese = 3;
  76.         calJewish = 4;
  77.         calCoptic = 5;
  78.         calPersian = 6;
  79.  
  80. { Integer Format Codes }
  81.         intWestern = 0;
  82.         intArabic = 1;
  83.         intRoman = 2;
  84.         intJapanese = 3;
  85.         intEuropean = 4;
  86.         intOutputMask = $8000;
  87.  
  88. { CharByte byte types }
  89.         smSingleByte = 0;
  90.         smFirstByte = -1;
  91.         smLastByte = 1;
  92.         smMiddleByte = 2;
  93.  
  94. { CharType field masks }
  95.         smcTypeMask = $000F;
  96.         smcReserved = $00F0;
  97.         smcClassMask = $0F00;
  98.         smcOrientationMask = $1000;                         {two-byte script glyph orientation}
  99.         smcRightMask = $2000;
  100.         smcUpperMask = $4000;
  101.         smcDoubleMask = $8000;
  102.  
  103. { Basic CharType character types }
  104.         smCharPunct = $0000;
  105.         smCharAscii = $0001;
  106.         smCharEuro = $0007;
  107.         smCharExtAscii = $0007;                             { More correct synonym for smCharEuro }
  108.  
  109. { Additional CharType character types for script systems }
  110.         smCharKatakana = $0002;                             {Japanese Katakana}
  111.         smCharHiragana = $0003;                             {Japanese Hiragana}
  112.         smCharIdeographic = $0004;                          {Hanzi, Kanji, Hanja}
  113.         smCharTwoByteGreek = $0005;                         {2-byte Greek in Far East systems}
  114.         smCharTwoByteRussian = $0006;                       {2-byte Cyrillic in Far East systems}
  115.         smCharBidirect = $0008;                             {Arabic/Hebrew}
  116.         smCharHangul = $000C;                               {Korean Hangul}
  117.         smCharJamo = $000D;                                 {Korean Jamo}
  118.  
  119. { old names for above, for backward compatibility }
  120.         smCharFISKana = $0002;                              {Katakana}
  121.         smCharFISGana = $0003;                              {Hiragana}
  122.         smCharFISIdeo = $0004;                              {Hanzi, Kanji, Hanja}
  123.         smCharFISGreek = $0005;                             {2-byte Greek in Far East systems}
  124.         smCharFISRussian = $0006;                           {2-byte Cyrillic in Far East systems}
  125.  
  126. { CharType classes for punctuation (smCharPunct) }
  127.         smPunctNormal = $0000;
  128.         smPunctNumber = $0100;
  129.         smPunctSymbol = $0200;
  130.         smPunctBlank = $0300;
  131.         smPunctRepeat = $0400;                              { FIS: wildcard }
  132.         smPunctGraphic = $0500;                             { FIS: line graphics }
  133.  
  134. { CharType classes for FISKana, FISGana }
  135.         smKanaSmall = $0100;                                {small kana character}
  136.         smKanaHardOK = $0200;                               {can have dakuten}
  137.         smKanaSoftOK = $0300;                               {can have dakuten or han-dakuten}
  138.  
  139. { CharType Ideographics classes for two-byte systems }
  140.         smIdeographicLevel1 = $0000;                        {level 1 char}
  141.         smIdeographicLevel2 = $0100;                        {level 2 char}
  142.         smIdeographicUser = $0200;                          {user char}
  143.  
  144. { old names for above, for backward compatibility }
  145.         smFISClassLvl1 = $0000;                             {level 1 char}
  146.         smFISClassLvl2 = $0100;                             {level 2 char}
  147.         smFISClassUser = $0200;                             {user char}
  148.  
  149. { CharType Jamo classes for Korean systems }
  150.         smJamoJaeum = $0000;                                {simple consonant char}
  151.         smJamoBogJaeum = $0100;                             {complex consonant char}
  152.         smJamoMoeum = $0200;                                {simple vowel char}
  153.         smJamoBogMoeum = $0300;                             {complex vowel char}
  154.  
  155. { CharType FIS glyph orientation }
  156.         smCharHorizontal = $0000;                           { horizontal character form, or for both }
  157.         smCharVertical = $1000;                             { vertical character form }
  158.  
  159. { CharType directions }
  160.         smCharLeft = $0000;
  161.         smCharRight = $2000;
  162.  
  163. { CharType case modifers }
  164.         smCharLower = $0000;
  165.         smCharUpper = $4000;
  166.  
  167. { CharType character size modifiers (1 or multiple bytes). }
  168.         smChar1byte = $0000;
  169.         smChar2byte = $8000;
  170.  
  171. { Char2Pixel directions }
  172.         smLeftCaret = 0;                                    {Place caret for left block}
  173.         smRightCaret = -1;                                  {Place caret for right block}
  174.         smHilite = 1;                                       {Direction is TESysJust}
  175.  
  176. { Transliterate target types for Roman }
  177.         smTransAscii = 0;
  178.         smTransNative = 1;
  179.         smTransCase = $FE;
  180.         smTransSystem = $FF;                                {convert to system script}
  181.  
  182. { Transliterate target types for FIS }
  183.         smTransAscii1 = 2;                                  {1-byte Roman}
  184.         smTransAscii2 = 3;                                  {2-byte Roman}
  185.         smTransKana1 = 4;                                   {1-byte Japanese Katakana}
  186.         smTransKana2 = 5;                                   {2-byte Japanese Katakana}
  187.         smTransGana2 = 7;                                   {2-byte Japanese Hiragana (no 1-byte Hiragana)}
  188.         smTransHangul2 = 8;                                 {2-byte Korean Hangul}
  189.         smTransJamo2 = 9;                                   {2-byte Korean Jamo}
  190.         smTransBopomofo2 = 10;                              {2-byte Chinese Bopomofo}
  191.  
  192. { Transliterate target modifiers }
  193.         smTransLower = $4000;
  194.         smTransUpper = $8000;
  195.  
  196. { Transliterate source mask - general }
  197.         smMaskAll = $FFFFFFFF;                              {Convert all text}
  198.  
  199. { Transliterate source masks }
  200.         smMaskAscii = $00000001;                            {2^smTransAscii}
  201.         smMaskNative = $00000002;                           {2^smTransNative}
  202.  
  203. { Transliterate source masks for FIS }
  204.         smMaskAscii1 = $00000004;                           {2^smTransAscii1}
  205.         smMaskAscii2 = $00000008;                           {2^smTransAscii2}
  206.         smMaskKana1 = $00000010;                            {2^smTransKana1}
  207.         smMaskKana2 = $00000020;                            {2^smTransKana2}
  208.         smMaskGana2 = $00000080;                            {2^smTransGana2}
  209.         smMaskHangul2 = $00000100;                          {2^smTransHangul2}
  210.         smMaskJamo2 = $00000200;                            {2^smTransJamo2}
  211.         smMaskBopomofo2 = $00000400;                        {2^smTransBopomofo2}
  212.  
  213. { Result values from GetEnvirons, SetEnvirons, GetScript and SetScript calls. }
  214.         smNotInstalled = 0;                                 {routine not available in script}
  215.         smBadVerb = -1;                                     {Bad verb passed to a routine}
  216.         smBadScript = -2;                                   {Bad script code passed to a routine}
  217.  
  218. { Values for script redraw flag. }
  219.         smRedrawChar = 0;                                   {Redraw character only}
  220.         smRedrawWord = 1;                                   {Redraw entire word (2-byte systems)}
  221.         smRedrawLine = -1;                                  {Redraw entire line (bidirectional systems)}
  222.  
  223. { GetEnvirons and SetEnvirons verbs }
  224.         smVersion = 0;                                      {Environment version number}
  225.         smMunged = 2;                                       {Globals change count}
  226.         smEnabled = 4;                                      {Environment enabled flag}
  227.         smBidirect = 6;                                     {At least on bidirect script}
  228.         smFontForce = 8;                                    {Force font flag}
  229.         smIntlForce = 10;                                   {Force intl flag}
  230.         smForced = 12;                                      {script forced to system script}
  231.         smDefault = 14;                                     {script defaulted to Roman script}
  232.         smPrint = 16;                                       {Printer action routine}
  233.         smSysScript = 18;                                   {System script}
  234.         smLastScript = 20;                                  {Last keyboard script}
  235.         smKeyScript = 22;                                   {Keyboard script}
  236.         smSysRef = 24;                                      {System folder refNum}
  237.         smKeyCache = 26;                                    {Keyboard table cache pointer}
  238.         smKeySwap = 28;                                     {Swapping table pointer}
  239.         smGenFlags = 30;                                    {General flags long}
  240.         smOverride = 32;                                    {Script override flags}
  241.         smCharPortion = 34;                                 {Ch vs SpExtra proportion}
  242.  
  243. { New for System 7.0: }
  244.         smDoubleByte = 36;                                  {Flag for double-byte script installed}
  245.         smKCHRCache = 38;                                   {Returns pointer to KCHR cache}
  246.         smRegionCode = 40;                                  {Returns current region code (verXxx)}
  247.  
  248. { GetScript and SetScript verbs.}
  249. {Note: Verbs private to script systems are negative, while}
  250. {those general across script systems are non-negative.}
  251.         smScriptVersion = 0;                                {Script software version}
  252.         smScriptMunged = 2;                                 {Script entry changed count}
  253.         smScriptEnabled = 4;                                {Script enabled flag}
  254.         smScriptRight = 6;                                  {Right to left flag}
  255.         smScriptJust = 8;                                   {Justification flag}
  256.         smScriptRedraw = 10;                                {Word redraw flag}
  257.         smScriptSysFond = 12;                               {Preferred system font}
  258.         smScriptAppFond = 14;                               {Preferred Application font}
  259.         smScriptBundle = 16;                                {Beginning of itlb verbs}
  260.         smScriptNumber = 16;                                {Script itl0 id}
  261.         smScriptDate = 18;                                  {Script itl1 id}
  262.         smScriptSort = 20;                                  {Script itl2 id}
  263.         smScriptFlags = 22;                                 {flags word}
  264.         smScriptToken = 24;                                 {Script itl4 id}
  265.         smScriptEncoding = 26;                              {id of optional itl5, if present}
  266.         smScriptLang = 28;                                  {Current language for script}
  267.         smScriptNumDate = 30;                               {Script KCHR id}
  268.         smScriptKeys = 32;                                  {Script KEYC id from dictionary}
  269.         smScriptIcon = 34;                                  {ID # of SICN or kcs#/kcs4/kcs8 suite}
  270.         smScriptPrint = 36;                                 {Script printer action routine}
  271.         smScriptTrap = 38;                                  {Trap entry pointer}
  272.         smScriptCreator = 40;                               {Script file creator}
  273.         smScriptFile = 42;                                  {Script file name}
  274.         smScriptName = 44;                                  {Script name}
  275.  
  276. { There is a hole here for old Kanji private verbs 46-76 }
  277. {}
  278. { New for System 7.0:}
  279.         smScriptMonoFondSize = 78;                          {default monospace FOND (hi) & size (lo)}
  280.         smScriptPrefFondSize = 80;                          {preferred FOND (hi) & size (lo)}
  281.         smScriptSmallFondSize = 82;                         {default small FOND (hi) & size (lo)}
  282.         smScriptSysFondSize = 84;                           {default system FOND (hi) & size (lo)}
  283.         smScriptAppFondSize = 86;                           {default app FOND (hi) & size (lo)}
  284.         smScriptHelpFondSize = 88;                          {default Help Mgr FOND (hi) & size (lo)}
  285.         smScriptValidStyles = 90;                           {mask of valid styles for script}
  286.         smScriptAliasStyle = 92;                            {style (set) to use for aliases}
  287.  
  288. { Negative verbs for KeyScript }
  289.         smKeyNextScript = -1;                               { Switch to next available script }
  290.         smKeySysScript = -2;                                { Switch to the system script }
  291.         smKeySwapScript = -3;                               { Switch to previously-used script }
  292.  
  293. { New for System 7.0: }
  294.         smKeyNextKybd = -4;                                 { Switch to next keyboard in current script }
  295.         smKeySwapKybd = -5;                                 { Switch to previously-used keyboard in current keyscript }
  296.  
  297.         smKeyDisableKybds = -6;                             { Disable keyboards not in system or Roman script }
  298.         smKeyEnableKybds = -7;                              { Re-enable keyboards for all enabled scripts }
  299.         smKeyToggleInline = -8;                             { Toggle inline input for current keyscript }
  300.         smKeyToggleDirection = -9;                          { Toggle default line direction (TESysJust) }
  301.         smKeyNextInputMethod = -10;                         { Switch to next input method in current keyscript }
  302.         smKeySwapInputMethod = -11;                         { Switch to last-used input method in current keyscript }
  303.  
  304.         smKeyDisableKybdSwitch = -12;                       { Disable switching from the current keyboard }
  305.  
  306.  
  307. { Bits in the smScriptFlags word}
  308. {(bits above 7 are non-static)}
  309.         smsfIntellCP = 0;                                   {script has intellegent cut & paste}
  310.         smsfSingByte = 1;                                   {script has only single bytes}
  311.         smsfNatCase = 2;                                    {native chars have upper & lower case}
  312.         smsfContext = 3;                                    {contextual script (e.g. AIS-based)}
  313.         smsfNoForceFont = 4;                                {Will not force characters}
  314.         smsfB0Digits = 5;                                   {Has alternate digits at B0-B9}
  315.         smsfAutoInit = 6;                                   {auto initialize the script}
  316.         smsfForms = 13;                                     {Uses contextual forms for letters}
  317.         smsfLigatures = 14;                                 {Uses contextual ligatures}
  318.         smsfReverse = 15;                                   {Reverses native text, right-left}
  319.  
  320. { Bits in the smGenFlags long.}
  321. {First (high-order) byte is set from itlc flags byte.}
  322.         smfShowIcon = 31;                                   {Show icon even if only one script}
  323.         smfDualCaret = 30;                                  {Use dual caret for mixed direction text}
  324.         smfNameTagEnab = 29;                                {Reserved for internal use}
  325.  
  326. { Roman script constants }
  327. {}
  328. { The following are here for backward compatibility, but should not be used. }
  329. { This information should be obtained using GetScript.}
  330.         romanSysFond = $3FFF;                               {system font id number}
  331.         romanAppFond = 3;                                   {application font id number}
  332.         romanFlags = $0007;                                 {roman settings}
  333.  
  334. { Script Manager font equates. }
  335.         smFondStart = $4000;                                {start from 16K}
  336.         smFondEnd = $C000;                                  {past end of range at 48K}
  337.  
  338. { Miscellaneous font equates. }
  339.         smUprHalfCharSet = $80;                             {first char code in top half of std char set}
  340.  
  341. { Character Set Extensions }
  342.         diaeresisUprY = $D9;
  343.         fraction = $DA;
  344.         intlCurrency = $DB;
  345.         leftSingGuillemet = $DC;
  346.         rightSingGuillemet = $DD;
  347.         fiLigature = $DE;
  348.         flLigature = $DF;
  349.         dblDagger = $E0;
  350.         centeredDot = $E1;
  351.         baseSingQuote = $E2;
  352.         baseDblQuote = $E3;
  353.         perThousand = $E4;
  354.         circumflexUprA = $E5;
  355.         circumflexUprE = $E6;
  356.         acuteUprA = $E7;
  357.         diaeresisUprE = $E8;
  358.         graveUprE = $E9;
  359.         acuteUprI = $EA;
  360.         circumflexUprI = $EB;
  361.         diaeresisUprI = $EC;
  362.         graveUprI = $ED;
  363.         acuteUprO = $EE;
  364.         circumflexUprO = $EF;
  365.         appleLogo = $F0;
  366.         graveUprO = $F1;
  367.         acuteUprU = $F2;
  368.         circumflexUprU = $F3;
  369.         graveUprU = $F4;
  370.         dotlessLwrI = $F5;
  371.         circumflex = $F6;
  372.         tilde = $F7;
  373.         macron = $F8;
  374.         breveMark = $F9;
  375.         overDot = $FA;
  376.         ringMark = $FB;
  377.         cedilla = $FC;
  378.         doubleAcute = $FD;
  379.         ogonek = $FE;
  380.         hachek = $FF;
  381.  
  382. { String2Date status values }
  383.         fatalDateTime = $8000;
  384.         longDateFound = 1;
  385.         leftOverChars = 2;
  386.         sepNotIntlSep = 4;
  387.         fieldOrderNotIntl = 8;
  388.         extraneousStrings = 16;
  389.         tooManySeps = 32;
  390.         sepNotConsistent = 64;
  391.         tokenErr = $8100;
  392.         cantReadUtilities = $8200;
  393.         dateTimeNotFound = $8400;
  394.         dateTimeInvalid = $8800;
  395.  
  396. { TokenType values }
  397.         tokenIntl = 4;                                      {the itl resource number of the tokenizer}
  398.         tokenEmpty = -1;
  399.         tokenUnknown = 0;
  400.         tokenWhite = 1;
  401.         tokenLeftLit = 2;
  402.         tokenRightLit = 3;
  403.         tokenAlpha = 4;
  404.         tokenNumeric = 5;
  405.         tokenNewLine = 6;
  406.         tokenLeftComment = 7;
  407.         tokenRightComment = 8;
  408.         tokenLiteral = 9;
  409.         tokenEscape = 10;
  410.         tokenAltNum = 11;
  411.         tokenRealNum = 12;
  412.         tokenAltReal = 13;
  413.         tokenReserve1 = 14;
  414.         tokenReserve2 = 15;
  415.         tokenLeftParen = 16;
  416.         tokenRightParen = 17;
  417.         tokenLeftBracket = 18;
  418.         tokenRightBracket = 19;
  419.         tokenLeftCurly = 20;
  420.         tokenRightCurly = 21;
  421.         tokenLeftEnclose = 22;
  422.         tokenRightEnclose = 23;
  423.         tokenPlus = 24;
  424.         tokenMinus = 25;
  425.         tokenAsterisk = 26;
  426.         tokenDivide = 27;
  427.         tokenPlusMinus = 28;
  428.         tokenSlash = 29;
  429.         tokenBackSlash = 30;
  430.         tokenLess = 31;
  431.         tokenGreat = 32;
  432.         tokenEqual = 33;
  433.         tokenLessEqual2 = 34;
  434.         tokenLessEqual1 = 35;
  435.         tokenGreatEqual2 = 36;
  436.         tokenGreatEqual1 = 37;
  437.         token2Equal = 38;
  438.         tokenColonEqual = 39;
  439.         tokenNotEqual = 40;
  440.         tokenLessGreat = 41;
  441.         tokenExclamEqual = 42;
  442.         tokenExclam = 43;
  443.         tokenTilde = 44;
  444.         tokenComma = 45;
  445.         tokenPeriod = 46;
  446.         tokenLeft2Quote = 47;
  447.         tokenRight2Quote = 48;
  448.         tokenLeft1Quote = 49;
  449.         tokenRight1Quote = 50;
  450.         token2Quote = 51;
  451.         token1Quote = 52;
  452.         tokenSemicolon = 53;
  453.         tokenPercent = 54;
  454.         tokenCaret = 55;
  455.         tokenUnderline = 56;
  456.         tokenAmpersand = 57;
  457.         tokenAtSign = 58;
  458.         tokenBar = 59;
  459.         tokenQuestion = 60;
  460.         tokenPi = 61;
  461.         tokenRoot = 62;
  462.         tokenSigma = 63;
  463.         tokenIntegral = 64;
  464.         tokenMicro = 65;
  465.         tokenCapPi = 66;
  466.         tokenInfinity = 67;
  467.         tokenColon = 68;
  468.         tokenHash = 69;
  469.         tokenDollar = 70;
  470.         tokenNoBreakSpace = 71;
  471.         tokenFraction = 72;
  472.         tokenIntlCurrency = 73;
  473.         tokenLeftSingGuillemet = 74;
  474.         tokenRightSingGuillemet = 75;
  475.         tokenPerThousand = 76;
  476.         tokenEllipsis = 77;
  477.         tokenCenterDot = 78;
  478.         tokenNil = 127;
  479.         delimPad = -2;
  480.  
  481. { obsolete, misspelled token names kept for backward compatibility }
  482.         tokenTilda = 44;
  483.         tokenCarat = 55;
  484.  
  485. { the NumberParts indices }
  486.         tokLeftQuote = 1;
  487.         tokRightQuote = 2;
  488.         tokLeadPlacer = 3;
  489.         tokLeader = 4;
  490.         tokNonLeader = 5;
  491.         tokZeroLead = 6;
  492.         tokPercent = 7;
  493.         tokPlusSign = 8;
  494.         tokMinusSign = 9;
  495.         tokThousands = 10;
  496.         tokSeparator = 12;                                  {11 is a reserved field}
  497.         tokEscape = 13;
  498.         tokDecPoint = 14;
  499.         tokEPlus = 15;
  500.         tokEMinus = 16;
  501.         tokMaxSymbols = 31;
  502.         curNumberPartsVersion = 1;                          {current version of NumberParts record}
  503.         fVNumber = 0;                                       {first version of NumFormatString}
  504.  
  505. { Date equates }
  506.         smallDateBit = 31;                                  {Restrict valid date/time to range of Time global}
  507.         togChar12HourBit = 30;                              {If toggling hour by char, accept hours 1..12 only}
  508.         togCharZCycleBit = 29;                              {Modifier for togChar12HourBit: accept hours 0..11 only}
  509.         togDelta12HourBit = 28;                             {If toggling hour up/down, restrict to 12-hour range (am/pm)}
  510.         genCdevRangeBit = 27;                               {Restrict date/time to range used by genl CDEV}
  511.         validDateFields = -1;
  512.         maxDateField = 10;
  513.         eraMask = $0001;
  514.         yearMask = $0002;
  515.         monthMask = $0004;
  516.         dayMask = $0008;
  517.         hourMask = $0010;
  518.         minuteMask = $0020;
  519.         secondMask = $0040;
  520.         dayOfWeekMask = $0080;
  521.         dayOfYearMask = $0100;
  522.         weekOfYearMask = $0200;
  523.         pmMask = $0400;
  524.         dateStdMask = $007F;
  525.  
  526. { Toggle results }
  527.         toggleUndefined = 0;
  528.         toggleOK = 1;
  529.         toggleBadField = 2;
  530.         toggleBadDelta = 3;
  531.         toggleBadChar = 4;
  532.         toggleUnknown = 5;
  533.         toggleBadNum = 6;
  534.         toggleOutOfRange = 7;                               {synonym for toggleErr3}
  535.         toggleErr3 = 7;
  536.         toggleErr4 = 8;
  537.         toggleErr5 = 9;
  538.  
  539. { Constants for truncWhere argument in TruncString and TruncText }
  540.         smTruncEnd = 0;                                     { Truncate at end }
  541.         smTruncMiddle = $4000;                              { Truncate in middle }
  542.  
  543. { Constants for TruncString and TruncText results }
  544.         smNotTruncated = 0;                                 { No truncation was necessary }
  545.         smTruncated = 1;                                    { Truncation performed }
  546.         smTruncErr = -1;                                    { General error }
  547.  
  548. {Constants for styleRunPosition argument in NPortionText, NDrawJust,}
  549. { NMeasureJust, NChar2Pixel, and NPixel2Char.}
  550.         smOnlyStyleRun = 0;                                 { This is the only style run on the line}
  551.         smLeftStyleRun = 1;                                 { This is leftmost of multiple style runs on the line}
  552.         smRightStyleRun = 2;                                { This is rightmost of multiple style runs on the line}
  553.         smMiddleStyleRun = 3;                               { There are multiple style runs on the line and this}
  554. { is neither the leftmost nor the rightmost.}
  555.  
  556.     type
  557.         TokenResults = (tokenOK, tokenOverflow, stringOverflow, badDelim, badEnding, crash);
  558.  
  559.         LongDateField = (eraField, yearField, monthField, dayField, hourField, minuteField, secondField, dayOfWeekField, dayOfYearField, weekOfYearField, pmField, res1Field, res2Field, res3Field);
  560.  
  561.         StyledLineBreakCode = (smBreakWord, smBreakChar, smBreakOverflow);
  562.  
  563.         FormatClass = (fPositive, fNegative, fZero);
  564.  
  565.         FormatResultType = (fFormatOK, fBestGuess, fOutOfSynch, fSpuriousChars, fMissingDelimiter, fExtraDecimal, fMissingLiteral, fExtraExp, fFormatOverflow, fFormStrIsNAN, fBadPartsTable, fExtraPercent, fExtraSeparator, fEmptyFormatString);
  566.  
  567.  
  568.         CharByteTable = packed array[0..255] of SignedByte;
  569.         ToggleResults = INTEGER;
  570.  
  571.         BreakTablePtr = ^BreakTable;
  572.         BreakTable = record
  573.                 charTypes: array[0..255] of SignedByte;
  574.                 tripleLength: INTEGER;
  575.                 triples: array[0..0] of INTEGER;
  576.             end;
  577.  
  578. { New NBreakTable for System 7.0: }
  579.         NBreakTablePtr = ^NBreakTable;
  580.         NBreakTable = record
  581.                 flags1: SignedByte;
  582.                 flags2: SignedByte;
  583.                 version: INTEGER;
  584.                 classTableOff: INTEGER;
  585.                 auxCTableOff: INTEGER;
  586.                 backwdTableOff: INTEGER;
  587.                 forwdTableOff: INTEGER;
  588.                 doBackup: INTEGER;
  589.                 reserved: INTEGER;
  590.                 charTypes: array[0..255] of SignedByte;
  591.                 tables: array[0..0] of INTEGER;
  592.             end;
  593.  
  594.         OffPair = record
  595.                 offFirst: INTEGER;
  596.                 offSecond: INTEGER;
  597.             end;
  598.  
  599.  
  600.         OffsetTable = array[0..2] of OffPair;
  601.  
  602.         ItlcRecord = record
  603.                 itlcSystem: INTEGER;                            {default system script}
  604.                 itlcReserved: INTEGER;                          {reserved}
  605.                 itlcFontForce: SignedByte;                      {default font force flag}
  606.                 itlcIntlForce: SignedByte;                      {default intl force flag}
  607.                 itlcOldKybd: SignedByte;                        {old keyboard}
  608.                 itlcFlags: SignedByte;                          {general flags}
  609.                 itlcIconOffset: INTEGER;                        {script icon offset}
  610.                 itlcIconSide: SignedByte;                       {icon side}
  611.                 itlcIconRsvd: SignedByte;                       {rsvd for other icon info}
  612.                 itlcRegionCode: INTEGER;                        {preferred verXxx code}
  613.                 itlcReserved3: array[0..33] of SignedByte;     {for future use}
  614.             end;
  615.  
  616.         ItlbRecord = record
  617.                 itlbNumber: INTEGER;                            {itl0 id number}
  618.                 itlbDate: INTEGER;                              {itl1 id number}
  619.                 itlbSort: INTEGER;                              {itl2 id number}
  620.                 itlbFlags: INTEGER;                             {Script flags}
  621.                 itlbToken: INTEGER;                             {itl4 id number}
  622.                 itlbEncoding: INTEGER;                          {itl5 ID # (optional; char encoding)}
  623.                 itlbLang: INTEGER;                              {cur language for script }
  624.                 itlbNumRep: SignedByte;                         {number representation code}
  625.                 itlbDateRep: SignedByte;                        {date representation code }
  626.                 itlbKeys: INTEGER;                              {KCHR id number}
  627.                 itlbIcon: INTEGER;                              {ID # of SICN or kcs#/kcs4/kcs8 suite.}
  628.             end;
  629.  
  630. { New ItlbExtRecord structure for System 7.0 }
  631.         ItlbExtRecord = record
  632.                 base: ItlbRecord;                               {un-extended ItlbRecord}
  633.                 itlbLocalSize: LONGINT;                         {size of script's local record}
  634.                 itlbMonoFond: INTEGER;                          {default monospace FOND ID}
  635.                 itlbMonoSize: INTEGER;                          {default monospace font size}
  636.                 itlbPrefFond: INTEGER;                          {preferred FOND ID}
  637.                 itlbPrefSize: INTEGER;                          {preferred font size}
  638.                 itlbSmallFond: INTEGER;                         {default small FOND ID}
  639.                 itlbSmallSize: INTEGER;                         {default small font size}
  640.                 itlbSysFond: INTEGER;                           {default system FOND ID}
  641.                 itlbSysSize: INTEGER;                           {default system font size}
  642.                 itlbAppFond: INTEGER;                           {default application FOND ID}
  643.                 itlbAppSize: INTEGER;                           {default application font size}
  644.                 itlbHelpFond: INTEGER;                          {default Help Mgr FOND ID}
  645.                 itlbHelpSize: INTEGER;                          {default Help Mgr font size}
  646.                 itlbValidStyles: Style;                         {set of valid styles for script}
  647.                 itlbAliasStyle: Style;                          {style (set) to mark aliases}
  648.             end;
  649.  
  650.         MachineLocation = record
  651.                 latitude: Fract;
  652.                 longitude: Fract;
  653.                 case INTEGER of
  654.                     0: (
  655.                             dlsDelta: SignedByte
  656.                     );                     {signed byte; daylight savings delta}
  657.                     1: (
  658.                             gmtDelta: LONGINT
  659.                     );                        {must mask - see documentation}
  660.             end;
  661.  
  662.  
  663.         String2DateStatus = INTEGER;
  664.         TokenType = INTEGER;
  665.         DelimType = array[0..1] of TokenType;
  666.         CommentType = array[0..3] of TokenType;
  667.  
  668.         TokenRecPtr = ^TokenRec;
  669.         TokenRec = record
  670.                 theToken: TokenType;
  671.                 position: Ptr;                                  {pointer into original Source}
  672.                 length: LONGINT;                                {length of text in original source}
  673.                 stringPosition: StringPtr;                      {Pascal/C string copy of identifier}
  674.             end;
  675.  
  676.         TokenBlockPtr = ^TokenBlock;
  677.         TokenBlock = record
  678.                 source: Ptr;                                    {pointer to stream of characters}
  679.                 sourceLength: LONGINT;                          {length of source stream}
  680.                 tokenList: Ptr;                                 {pointer to array of tokens}
  681.                 tokenLength: LONGINT;                           {maximum length of TokenList}
  682.                 tokenCount: LONGINT;                            {number tokens generated by tokenizer}
  683.                 stringList: Ptr;                                {pointer to stream of identifiers}
  684.                 stringLength: LONGINT;                          {length of string list}
  685.                 stringCount: LONGINT;                           {number of bytes currently used}
  686.                 doString: BOOLEAN;                              {make strings & put into StringLIst}
  687.                 doAppend: BOOLEAN;                              {append to TokenList rather than replace}
  688.                 doAlphanumeric: BOOLEAN;                        {identifiers may include numeric}
  689.                 doNest: BOOLEAN;                                {do comments nest?}
  690.                 leftDelims: array[0..1] of TokenType;
  691.                 rightDelims: array[0..1] of TokenType;
  692.                 leftComment: array[0..3] of TokenType;
  693.                 rightComment: array[0..3] of TokenType;
  694.                 escapeCode: TokenType;                          {escape symbol code}
  695.                 decimalCode: TokenType;
  696.                 itlResource: Handle;                            {ptr to itl4 resource of current script}
  697.                 reserved: array[0..7] of LONGINT;              {must be zero!}
  698.             end;
  699.  
  700.         UntokenTablePtr = ^UntokenTable;
  701.         UntokenTableHandle = ^UntokenTablePtr;
  702.         UntokenTable = record
  703.                 len: INTEGER;
  704.                 lastToken: INTEGER;
  705.                 index: array[0..255] of INTEGER;               {index table; last = lastToken}
  706.             end;
  707.  
  708.         DateCachePtr = ^DateCacheRecord;
  709.         DateCacheRecord = packed record
  710.                 hidden: array[0..255] of INTEGER;              {only for temporary use}
  711.             end;
  712.  
  713.  
  714.         LongDateTime = comp;
  715.  
  716.         LongDateCvt = record
  717.                 case INTEGER of
  718.                     0: (
  719.                             c: Comp
  720.                     );
  721.                     1: (
  722.                             lHigh: LONGINT;
  723.                             lLow: LONGINT
  724.                     );
  725.             end;
  726.  
  727.         LongDateRec = record
  728.                 case INTEGER of
  729.                     0: (
  730.                             era: INTEGER;
  731.                             year: INTEGER;
  732.                             month: INTEGER;
  733.                             day: INTEGER;
  734.                             hour: INTEGER;
  735.                             minute: INTEGER;
  736.                             second: INTEGER;
  737.                             dayOfWeek: INTEGER;
  738.                             dayOfYear: INTEGER;
  739.                             weekOfYear: INTEGER;
  740.                             pm: INTEGER;
  741.                             res1: INTEGER;
  742.                             res2: INTEGER;
  743.                             res3: INTEGER
  744.                     );
  745.                     1: (
  746.                             list: array[0..13] of INTEGER
  747.                     );           {Index by LongDateField!}
  748.                     2: (
  749.                             eraAlt: INTEGER;
  750.                             oldDate: DateTimeRec
  751.                     );
  752.             end;
  753.  
  754.  
  755.         DateDelta = SignedByte;
  756.  
  757.         TogglePB = record
  758.                 togFlags: LONGINT;                              {caller normally sets low word to dateStdMask=$7F}
  759.                 amChars: ResType;                               {from intl0}
  760.                 pmChars: ResType;                               {from intl0}
  761.                 reserved: array[0..3] of LONGINT;
  762.             end;
  763.  
  764.  
  765.         FormatOrder = array[0..0] of INTEGER;
  766.         FormatOrderPtr = ^FormatOrder;
  767.         FormatStatus = INTEGER;
  768.  
  769.         WideChar = record
  770.                 case BOOLEAN of
  771.                     TRUE: (
  772.                             a: packed array[0..1] of CHAR
  773.                     );           {0 is the high order character}
  774.                     FALSE: (
  775.                             b: INTEGER
  776.                     );
  777.             end;
  778.  
  779.         WideCharArr = record
  780.                 size: INTEGER;
  781.                 data: packed array[0..9] of WideChar;
  782.             end;
  783.  
  784.         NumFormatString = packed record
  785.                 fLength: Byte;
  786.                 fVersion: Byte;
  787.                 data: packed array[0..253] of SignedByte;      {private data}
  788.             end;
  789.  
  790.         Itl4Ptr = ^Itl4Rec;
  791.         Itl4Handle = ^Itl4Ptr;
  792.         Itl4Rec = record
  793.                 flags: INTEGER;
  794.                 resourceType: LONGINT;
  795.                 resourceNum: INTEGER;
  796.                 version: INTEGER;
  797.                 resHeader1: LONGINT;
  798.                 resHeader2: LONGINT;
  799.                 numTables: INTEGER;                             {one-based}
  800.                 mapOffset: LONGINT;                             {offsets are from record start}
  801.                 strOffset: LONGINT;
  802.                 fetchOffset: LONGINT;
  803.                 unTokenOffset: LONGINT;
  804.                 defPartsOffset: LONGINT;
  805.                 resOffset6: LONGINT;
  806.                 resOffset7: LONGINT;
  807.                 resOffset8: LONGINT;
  808.             end;
  809.  
  810. { New NItl4Rec for System 7.0: }
  811.         NItl4Ptr = ^NItl4Rec;
  812.         NItl4Handle = ^NItl4Ptr;
  813.         NItl4Rec = record
  814.                 flags: INTEGER;
  815.                 resourceType: LONGINT;
  816.                 resourceNum: INTEGER;
  817.                 version: INTEGER;
  818.                 format: INTEGER;
  819.                 resHeader: INTEGER;
  820.                 resHeader2: LONGINT;
  821.                 numTables: INTEGER;                             {one-based}
  822.                 mapOffset: LONGINT;                             {offsets are from record start}
  823.                 strOffset: LONGINT;
  824.                 fetchOffset: LONGINT;
  825.                 unTokenOffset: LONGINT;
  826.                 defPartsOffset: LONGINT;
  827.                 whtSpListOffset: LONGINT;
  828.                 resOffset7: LONGINT;
  829.                 resOffset8: LONGINT;
  830.                 resLength1: INTEGER;
  831.                 resLength2: INTEGER;
  832.                 resLength3: INTEGER;
  833.                 unTokenLength: INTEGER;
  834.                 defPartsLength: INTEGER;
  835.                 whtSpListLength: INTEGER;
  836.                 resLength7: INTEGER;
  837.                 resLength8: INTEGER;
  838.             end;
  839.  
  840.         NumberPartsPtr = ^NumberParts;
  841.         NumberParts = record
  842.                 version: INTEGER;
  843.                 data: array[1..31] of WideChar;                {index by [tokLeftQuote..tokMaxSymbols]}
  844.                 pePlus: WideCharArr;
  845.                 peMinus: WideCharArr;
  846.                 peMinusPlus: WideCharArr;
  847.                 altNumTable: WideCharArr;
  848.                 reserved: packed array[0..19] of CHAR;
  849.             end;
  850.  
  851.         FVector = record
  852.                 start: INTEGER;
  853.                 length: INTEGER;
  854.             end;
  855.  
  856.  
  857.         TripleInt = array[0..2] of FVector;                { index by [fPositive..fZero] }
  858.  
  859.         ScriptRunStatus = record
  860.                 script: SignedByte;
  861.                 variant: SignedByte;
  862.             end;
  863.  
  864.  
  865. { type for truncWhere parameter in new TruncString, TruncText }
  866.         TruncCode = INTEGER;
  867.  
  868. { type for styleRunPosition parameter in NPixel2Char etc. }
  869.         JustStyleCode = INTEGER;
  870.  
  871.     function FontScript: INTEGER;
  872.     inline
  873.         $2F3C, $8200, $0000, $A8B5;
  874.     function IntlScript: INTEGER;
  875.     inline
  876.         $2F3C, $8200, $0002, $A8B5;
  877.     procedure KeyScript (code: INTEGER);
  878.     inline
  879.         $2F3C, $8002, $0004, $A8B5;
  880.     function Font2Script (fontNumber: INTEGER): INTEGER;
  881.     inline
  882.         $2F3C, $8202, $0006, $A8B5;
  883.     function GetEnvirons (verb: INTEGER): LONGINT;
  884.     inline
  885.         $2F3C, $8402, $0008, $A8B5;
  886.     function SetEnvirons (verb: INTEGER; param: LONGINT): OSErr;
  887.     inline
  888.         $2F3C, $8206, $000A, $A8B5;
  889.     function GetScript (script: INTEGER; verb: INTEGER): LONGINT;
  890.     inline
  891.         $2F3C, $8404, $000C, $A8B5;
  892.     function SetScript (script: INTEGER; verb: INTEGER; param: LONGINT): OSErr;
  893.     inline
  894.         $2F3C, $8208, $000E, $A8B5;
  895.     function CharByte (textBuf: Ptr; textOffset: INTEGER): INTEGER;
  896.     inline
  897.         $2F3C, $8206, $0010, $A8B5;
  898.     function CharType (textBuf: Ptr; textOffset: INTEGER): INTEGER;
  899.     inline
  900.         $2F3C, $8206, $0012, $A8B5;
  901.     function Pixel2Char (textBuf: Ptr; textLen: INTEGER; slop: INTEGER; pixelWidth: INTEGER; var leadingEdge: BOOLEAN): INTEGER;
  902.     inline
  903.         $2F3C, $820E, $0014, $A8B5;
  904.     function Char2Pixel (textBuf: Ptr; textLen: INTEGER; slop: INTEGER; offset: INTEGER; direction: INTEGER): INTEGER;
  905.     inline
  906.         $2F3C, $820C, $0016, $A8B5;
  907.     function Transliterate (srcHandle: Handle; dstHandle: Handle; target: INTEGER; srcMask: LONGINT): OSErr;
  908.     inline
  909.         $2F3C, $820E, $0018, $A8B5;
  910.     procedure FindWord (textPtr: Ptr; textLength: INTEGER; offset: INTEGER; leadingEdge: BOOLEAN; breaks: BreakTablePtr; var offsets: OffsetTable);
  911.     inline
  912.         $2F3C, $8012, $001A, $A8B5;
  913.     procedure HiliteText (textPtr: Ptr; textLength: INTEGER; firstOffset: INTEGER; secondOffset: INTEGER; var offsets: OffsetTable);
  914.     inline
  915.         $2F3C, $800E, $001C, $A8B5;
  916.     procedure DrawJust (textPtr: Ptr; textLength: INTEGER; slop: INTEGER);
  917.     inline
  918.         $2F3C, $8008, $001E, $A8B5;
  919.     procedure MeasureJust (textPtr: Ptr; textLength: INTEGER; slop: INTEGER; charLocs: Ptr);
  920.     inline
  921.         $2F3C, $800C, $0020, $A8B5;
  922.     function ParseTable (var table: CharByteTable): BOOLEAN;
  923.     inline
  924.         $2F3C, $8204, $0022, $A8B5;
  925.     function GetDefFontSize: INTEGER;
  926.     inline
  927.         $3EB8, $0BA8, $6604, $3EBC, $000C;
  928.     function GetSysFont: INTEGER;
  929.     inline
  930.         $3EB8, $0BA6;
  931.     function GetAppFont: INTEGER;
  932.     inline
  933.         $3EB8, $0984;
  934.     function GetMBarHeight: INTEGER;
  935.     inline
  936.         $3EB8, $0BAA;
  937.     function GetSysJust: INTEGER;
  938.     inline
  939.         $3EB8, $0BAC;
  940.     procedure SetSysJust (newJust: INTEGER);
  941.     inline
  942.         $31DF, $0BAC;
  943.     procedure ReadLocation (var loc: MachineLocation);
  944.     inline
  945.         $205F, $203C, $000C, $00E4, $A051;
  946.     procedure WriteLocation (loc: MachineLocation);
  947.     inline
  948.         $205F, $203C, $000C, $00E4, $A052;
  949.     procedure UprText (textPtr: Ptr; len: INTEGER);
  950.     inline
  951.         $301F, $205F, $A054;
  952.     procedure LwrText (textPtr: Ptr; len: INTEGER);
  953.     inline
  954.         $301F, $205F, $A056;
  955.  
  956.  
  957. {  New for 7.0  }
  958.     procedure LowerText (textPtr: Ptr; len: INTEGER);
  959.     inline
  960.         $301F, $205F, $A056;
  961.     procedure StripText (textPtr: Ptr; len: INTEGER);
  962.     inline
  963.         $301F, $205F, $A256;
  964.     procedure UpperText (textPtr: Ptr; len: INTEGER);
  965.     inline
  966.         $301F, $205F, $A456;
  967.     procedure StripUpperText (textPtr: Ptr; len: INTEGER);
  968.     inline
  969.         $301F, $205F, $A656;
  970.  
  971.     function StyledLineBreak (textPtr: Ptr; textLen: LONGINT; textStart: LONGINT; textEnd: LONGINT; flags: LONGINT; var textWidth: Fixed; var textOffset: LONGINT): StyledLineBreakCode;
  972.     inline
  973.         $2F3C, $821C, $FFFE, $A8B5;
  974.     procedure GetFormatOrder (ordering: FormatOrderPtr; firstFormat: INTEGER; lastFormat: INTEGER; lineRight: BOOLEAN; rlDirProc: Ptr; dirParam: Ptr);
  975.     inline
  976.         $2F3C, $8012, $FFFC, $A8B5;
  977.     function IntlTokenize (tokenParam: TokenBlockPtr): TokenResults;
  978.     inline
  979.         $2F3C, $8204, $FFFA, $A8B5;
  980.     function InitDateCache (theCache: DateCachePtr): OSErr;
  981.     inline
  982.         $2F3C, $8204, $FFF8, $A8B5;
  983.     function String2Date (textPtr: Ptr; textLen: LONGINT; theCache: DateCachePtr; var lengthUsed: LONGINT; var dateTime: LongDateRec): String2DateStatus;
  984.     inline
  985.         $2F3C, $8214, $FFF6, $A8B5;
  986.     function String2Time (textPtr: Ptr; textLen: LONGINT; theCache: DateCachePtr; var lengthUsed: LONGINT; var dateTime: LongDateRec): String2DateStatus;
  987.     inline
  988.         $2F3C, $8214, $FFF4, $A8B5;
  989.     procedure LongDate2Secs (lDate: LongDateRec; var lSecs: LongDateTime);
  990.     inline
  991.         $2F3C, $8008, $FFF2, $A8B5;
  992.     procedure LongSecs2Date (var lSecs: LongDateTime; var lDate: LongDateRec);
  993.     inline
  994.         $2F3C, $8008, $FFF0, $A8B5;
  995.     function ToggleDate (var lSecs: LongDateTime; field: LongDateField; delta: DateDelta; ch: INTEGER; params: TogglePB): ToggleResults;
  996.     inline
  997.         $2F3C, $820E, $FFEE, $A8B5;
  998.     function Str2Format (inString: Str255; partsTable: NumberParts; var outString: NumFormatString): FormatStatus;
  999.     inline
  1000.         $2F3C, $820C, $FFEC, $A8B5;
  1001.     function Format2Str (myCanonical: NumFormatString; partsTable: NumberParts; var outString: Str255; var positions: TripleInt): FormatStatus;
  1002.     inline
  1003.         $2F3C, $8210, $FFEA, $A8B5;
  1004.     function FormatX2Str (x: extended; myCanonical: NumFormatString; partsTable: NumberParts; var outString: Str255): FormatStatus;
  1005.     inline
  1006.         $2F3C, $8210, $FFE8, $A8B5;
  1007.     function FormatStr2X (source: Str255; myCanonical: NumFormatString; partsTable: NumberParts; var x: extended): FormatStatus;
  1008.     inline
  1009.         $2F3C, $8210, $FFE6, $A8B5;
  1010.     function PortionText (textPtr: Ptr; textLen: LONGINT): Fixed;
  1011.     inline
  1012.         $2F3C, $8408, $0024, $A8B5;
  1013.     function FindScriptRun (textPtr: Ptr; textLen: LONGINT; var lenUsed: LONGINT): ScriptRunStatus;
  1014.     inline
  1015.         $2F3C, $820C, $0026, $A8B5;
  1016.     function VisibleLength (textPtr: Ptr; textLen: LONGINT): LONGINT;
  1017.     inline
  1018.         $2F3C, $8408, $0028, $A8B5;
  1019.     function ValidDate (var vDate: LongDateRec; flags: LONGINT; var newSecs: LongDateTime): INTEGER;
  1020.     inline
  1021.         $2F3C, $8204, $FFE4, $A8B5;
  1022.  
  1023.  
  1024. {  New for 7.0  }
  1025.     procedure NFindWord (textPtr: Ptr; textLength: INTEGER; offset: INTEGER; leadingEdge: BOOLEAN; nbreaks: NBreakTablePtr; var offsets: OffsetTable);
  1026.     inline
  1027.         $2F3C, $8012, $FFE2, $A8B5;
  1028.     function TruncString (width: INTEGER; var theString: Str255; truncWhere: TruncCode): INTEGER;
  1029.     inline
  1030.         $2F3C, $8208, $FFE0, $A8B5;
  1031.     function TruncText (width: INTEGER; textPtr: Ptr; var length: INTEGER; truncWhere: TruncCode): INTEGER;
  1032.     inline
  1033.         $2F3C, $820C, $FFDE, $A8B5;
  1034.     function ReplaceText (baseText: Handle; substitutionText: Handle; key: Str15): INTEGER;
  1035.     inline
  1036.         $2F3C, $820C, $FFDC, $A8B5;
  1037.     function NPixel2Char (textBuf: Ptr; textLen: LONGINT; slop: Fixed; pixelWidth: Fixed; var leadingEdge: BOOLEAN; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): INTEGER;
  1038.     inline
  1039.         $2F3C, $8222, $002E, $A8B5;
  1040.     function NChar2Pixel (textBuf: Ptr; textLen: LONGINT; slop: Fixed; offset: LONGINT; direction: INTEGER; styleRunPosition: JustStyleCode; numer: Point; denom: Point): INTEGER;
  1041.     inline
  1042.         $2F3C, $821C, $0030, $A8B5;
  1043.     procedure NDrawJust (textPtr: Ptr; textLength: LONGINT; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point);
  1044.     inline
  1045.         $2F3C, $8016, $0032, $A8B5;
  1046.     procedure NMeasureJust (textPtr: Ptr; textLength: LONGINT; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point);
  1047.     inline
  1048.         $2F3C, $801A, $0034, $A8B5;
  1049.     function NPortionText (textPtr: Ptr; textLen: LONGINT; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed;
  1050.     inline
  1051.         $2F3C, $8412, $0036, $A8B5;
  1052.  
  1053.  
  1054.     { UsingScript }
  1055.  
  1056.  
  1057. implementation
  1058. end.
  1059.